//
//  HLSearchUserRequest.m
//  YueYue
//
//  Created by hulu001 on 2023/6/16.
//

#import "HLSearchUserRequest.h"

@implementation HLSearchUserRequest
{
    NSString *_keyword;
}

- (instancetype)initWithKeyword:(NSString *)keyword
{
    self = [super init];
    if (self){
        _keyword = keyword;
    }
    return self;
}

- (NSString *)requestUrl
{
    return @"/user/search";
}

- (YTKRequestMethod)requestMethod
{
    return YTKRequestMethodGET;
}

- (id)requestArgument
{
    return @{@"userYueId":_keyword};
}

- (HLSearchUserModel *)userList
{
    HLSearchUserModel *user;
    NSDictionary *data = [self.result valueForKey:@"data"];
    if ([data isKindOfClass:NSDictionary.class]){
        return [HLSearchUserModel mj_objectWithKeyValues:data];
    }
    return user;
}


@end
